<script setup lang="ts">
import {
  AddCircleOutlineTwotone,
  DeleteForeverOutlined,
  ManageSearchFilled,
} from "@vicons/material";

defineProps(["title"]);
defineEmits([
  "insert-entity",
  "delete-entity",
  "search-entity",
  "reset-search-entity",
]);
</script>

<template>
  <div style="display: flex; justify-content: start; margin-bottom: 20px">
    <!--  条件查询-->
    <!--新增、删除、查询、重置查询-->
    <n-button-group>
      <n-button :ghost="true" color="#2080f0" @click="$emit('insert-entity')">
        <template #icon>
          <n-icon>
            <AddCircleOutlineTwotone />
          </n-icon>
        </template>
        新增
      </n-button>
      <n-button :ghost="true" color="#2080f0" @click="$emit('delete-entity')">
        <template #icon>
          <n-icon>
            <DeleteForeverOutlined />
          </n-icon>
        </template>
        删除
      </n-button>
      <n-button :ghost="true" color="#2080f0" @click="$emit('search-entity')">
        <template #icon>
          <n-icon>
            <ManageSearchFilled />
          </n-icon>
        </template>
        查询
      </n-button>
      <n-button
        :ghost="true"
        color="#2080f0"
        @click="$emit('reset-search-entity')"
      >
        <template #icon>
          <n-icon>
            <ManageSearchFilled />
          </n-icon>
        </template>
        重置查询
      </n-button>
    </n-button-group>
  </div>
</template>
